home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / earcd / misc / emu / arosdev.lha / AROS / rom / utility / tolower.c < prev    next >
C/C++ Source or Header  |  1997-01-27  |  2KB  |  80 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: tolower.c,v 1.7 1997/01/27 00:32:33 ldp Exp $
  4.     $Log: tolower.c,v $
  5.     Revision 1.7  1997/01/27 00:32:33  ldp
  6.     Polish
  7.  
  8.     Revision 1.6  1996/12/10 14:00:16  aros
  9.     Moved #include into first column to allow makedepend to see it.
  10.  
  11.     Revision 1.5  1996/10/24 15:51:38  aros
  12.     Use the official AROS macros over the __AROS versions.
  13.  
  14.     Revision 1.4  1996/09/13 17:14:47  digulla
  15.     Removed the TOLOWER() macros. Use the library function instead
  16.  
  17.     Revision 1.3  1996/08/13 14:10:31  digulla
  18.     Replaced AROS_LA by AROS_LHA
  19.  
  20.     Revision 1.2  1996/08/01 17:41:42  digulla
  21.     Added standard header for all files
  22.  
  23.     Desc:
  24.     Lang: english
  25. */
  26. #include <exec/types.h>
  27. #include <aros/libcall.h>
  28. #include "utility_intern.h"
  29.  
  30. /*****************************************************************************
  31.  
  32.     NAME */
  33. #include <proto/utility.h>
  34.  
  35.     AROS_LH1I(UBYTE, ToLower,
  36.  
  37. /*  SYNOPSIS */
  38.     AROS_LHA(ULONG, character, D0),
  39.  
  40. /*  LOCATION */
  41.     struct UtilityBase *, UtilityBase, 30, Utility)
  42.  
  43. /*  FUNCTION
  44.     Convert a character to lower case.
  45.  
  46.     INPUTS
  47.     character - The character to convert.
  48.  
  49.     RESULT
  50.     Equivalent lower case character.
  51.  
  52.     NOTES
  53.  
  54.     EXAMPLE
  55.  
  56.     BUGS
  57.  
  58.     SEE ALSO
  59.  
  60.     INTERNALS
  61.  
  62.     HISTORY
  63.  
  64. *****************************************************************************/
  65. {
  66.     AROS_LIBFUNC_INIT
  67.  
  68.     return
  69.     (
  70.     (character >= 'A' && character <= 'Z')
  71.     || (character >= 0xC0
  72.         && character <= 0xDE
  73.         && character != 0xD7)
  74.     ? character + 0x20
  75.     : character
  76.     );
  77.  
  78.     AROS_LIBFUNC_EXIT
  79. } /* ToLower */
  80.